package com.k8.common.executor.threadPool;

import com.k8.common.annotation.SPI;
import com.k8.common.extension.Adaptive;
import com.k8.rpc.url.URL;

import java.util.concurrent.ExecutorService;

import static com.k8.common.constants.CommonKeyConstants.THREAD_POOL_TYPE;
import static com.k8.common.constants.SpiConstants.CACHED_THREAD_POOL;

/*
* 考虑是否添加支持拒绝策略和阻塞队列类型
* */
@SPI(CACHED_THREAD_POOL)
public interface ThreadPool {
    @Adaptive(THREAD_POOL_TYPE)
    ExecutorService getExecutor(URL url);
}
